#include<stdio.h>
int main()
{
    int i,j,k,n;
    for(i=100;i<=999;i++){
        j=i%10;
        k=i/10%10;
        n=i/100;
        if(i==j*j*j+n*n*n+k*k*k){
        printf("%d ",i);}
    }
    printf("\n");
}